Since our VMC is a big iron, we ran out with available inputs & outputs quickly, using the Mesa Cards.
An inexpensive choice was using the parallel port getting 17 extra IO's.
We also solved to add a second parallel port getting another 17 extra IO's.
But what about the serial port?

Very fast we learned that the serial port is way too slow for any realtime access.
On the other hand there are a lot of people, in doing a retrofit, that encounter IO's
connected to a serial port card.
We also learned that a USB connection is family of the serial port protocol.
Part of the documentation handles the serial port.
Since we donot have any issue in this way, we explored a more interesting part,
TALKING TO THE USB PORT FOR IO's.
So we bought Martzis USB HID Interface (MUHI) Card Board For Linux EMC and Mach 3 PC Via BUS



Here is the description:

Martzis USB HID Interface card for Linux EMC and Mach 3
Martzis USB HID Interface (MUHI) card. Card is connected to PC via USB bus and operating systems recognizes
it as two joystick devices both having 32 buttons and 4 axes.
Card is a generic Human Interface Device (HID) so it is supported on most operating systems including
Windows and Linux. The card is primarily developed to be used with Linuc EMC software.
Although, I have also made a plugin wich makes card Mach 3 compatible.
Card works also with Mach 3 keygrabber without encoder support.

Inputs: · 64 digital inputs (LS TTL)
· 4 analog inputs (0-5V)
· 4 encoder inputs (1x or 2x)
All 64 digital 5V logic inputs are pulled up via LS TTL internal resistors.
A simple switch can be connected directly between input and ground.
4 analog inputs can measure a voltage between 0-5V.
A potentiometer can be connected directly to these inputs.
The center wire is connected to the input pin and two other wires to ground and 5V connectors.
4 encoder inputs can be configured to work in 1X or 2X mode.
Encoder inputs can also be used as pulse counters.
In 1X mode A channel counts either rising or falling edges if B channel is connected permanetly to 5V or ground.
In 2X mode card counts both rising and falling edges if the signal is connected to both A and B channel.
Jumpers:
Card has 5 jumper connectors which configures card functionalities during card startup:
JP1 = Disables analog channels. Minimizes USB traffic if analog inputs are not needed.
JP2 = 1X mode for encoder channels 1 and 2.
JP3 = 1X mode for encoder channel 3.
JP4 = 1X mode for encoder channel 4.
JP5 = Invert digital inputs.
Linux EMC
Features:
·64 digital inputs (input.[0-1].btn_[1-32].
·analog inputs are shows as absolute value between 1-254 (input.0.abs_[1-4]).
encoder inputs increase or decrease input value.


Here is the Hal file for an MPG with this card:

loadusr -W hal_input usb-0000:00:1f.4-1/input0 usb-0000:00:1f.4-1/input1

loadrt mux4 count=1

addf mux4.0 servo-thread

setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001

net scale1 mux4.0.sel0 <= input.0.btn-06
net scale2 mux4.0.sel1 <= input.0.btn-07

net pend-scale axis.0.jog-scale <= mux4.0.out
net pend-scale axis.1.jog-scale
net pend-scale axis.2.jog-scale

net mpg-x axis.0.jog-enable <= input.0.btn-01
net mpg-y axis.1.jog-enable <= input.0.btn-02
net mpg-z axis.2.jog-enable <= input.0.btn-03

net pend-counts axis.0.jog-counts <= input.1.rel-1-counts
net pend-counts axis.1.jog-counts
net pend-counts axis.2.jog-counts



The Youtube link for the card is on:HERE

The manual for the Card is here MACH3 USB HID English

The A942A.rar is HERE